package com.tl.boot.common.annotation;

import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.lang.annotation.*;

/**
 * com.tl.boot.common.annotation -- RestControllerRequstMapping
 * Description: 对RequestMapping和RestController做了综合的封装
 * 此注解只能用于类上
 * Created by joshua_liu <a href="mailto:joshualwork@163.com"></a>
 * On 2019/10/28 9:06
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RequestMapping
@RestController
public @interface RestControllerRequstMapping {
    /**
     * Alias for {@link RequestMapping#name}.
     */
    @AliasFor(value = "name",annotation = RequestMapping.class)
    String name() default "";

    /**
     * Alias for {@link RequestMapping#value}.
     */
    @AliasFor(value = "value",annotation = RequestMapping.class)
    String[] value() default {};

    /**
     * Alias for {@link RequestMapping#path}.
     */
    @AliasFor(value = "path",annotation = RequestMapping.class)
    String[] path() default {};

}
